package Lab08.Q5;

import java.util.HashMap;
import java.util.Map;

public class EmailSplit {
    public static void main(String[] args) {
        String str = "aa@sohu.com,bb@163.com,cc@sina.com";
        Map<String, String> emailMap = new HashMap<String, String>();
        String[] email =str.split(",");
        for(String e:email){
            emailMap.put(e.split("@")[0], e.split("@")[1]);
        }
        System.out.println(emailMap.toString());
    }
}